﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Playables;

[RequireComponent(typeof(TimeLinePlayer))]
public class TimeLinePlayer : MonoBehaviour
{
    public Condition condition;
    private PlayableDirector player;

    // Start is called before the first frame update
    void Start()
    {
        player = GetComponent<PlayableDirector>();
    }

    // Update is called once per frame
    void Update()
    {
        if (condition.ToJump)
        {
            condition.ToJump = false;
            player.Play();
        }
    }
}
